# Contributor: Antoine Martin (ayakael) <dev@ayakael.net>
# Maintainer: Antoine Martin (ayakael) <dev@ayakael.net>
pkgname=py3-django-redis
_pyname=django-redis
pkgver=5.4.0
pkgrel=1
arch="noarch"
pkgdesc="Full featured redis cache backend for Django."
url="https://pypi.python.org/project/django-redis"
license="BSD-3-Clause"
depends="
	py3-django
	"
makedepends="
	py3-setuptools
	py3-wheel
	py3-gpep517
	py3-redis
	"
checkdepends="
	py3-pytest
	"
options="!check" # Missing depends for test
source="$pkgname-$pkgver.tar.gz::https://pypi.io/packages/source/d/django-redis/django-redis-$pkgver.tar.gz"
builddir="$srcdir"/$_pyname-$pkgver
subpackages="$pkgname-pyc"

build() {
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

check() {
	PYTHONPATH="$PYTHONPATH/.dist" pytest -v
}

package() {
	python3 -m installer -d "$pkgdir" \
		.dist/*.whl
}

sha512sums="
12eb85ee3ce2c8fcf013c804a630bd3eb943de0980d1f6d365b5b5ed762ab956db80329f3e170f330ccc5b9e6f178ffa7938b1880477b7fb609d2cc3680b984a  py3-django-redis-5.4.0.tar.gz
"
